package com.farm.area.pojo;

import com.farm.device.pojo.Device;
import com.farm.opjo.Crops;
import com.farm.shop.pojo.CustDevice;
import com.fasterxml.jackson.annotation.JsonInclude;

import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * 农田实体
 * @author azhe
 * @create 2020/10/10
 */
@JsonInclude(value = JsonInclude.Include.NON_NULL)
@Table(name = "t_cust_farmland")
public class FarmLand implements Serializable {

    /**
     * 主键
     */
    @Id
    private Integer id;

    /**
     * 所属于农场id
     */
    private Integer farmId;

    /**
     * 大小
     */
    private String size;

    /**
     * 形状
     */
    private String shape;

    public Crops getCrops() {
        return crops;
    }

    public void setCrops(Crops crops) {
        this.crops = crops;
    }

    /**
     * 一对一
     * 农作物集合
     */
    private Crops crops;

    /**
     * 一对多
     * 设备集合
     */
    private List<CustDevice> devices = new ArrayList<>();

    public List<CustDevice> getDevices() {
        return devices;
    }

    public void setDevices(List<CustDevice> devices) {
        this.devices = devices;
    }

    /**
     * 编号
     */
    private String code;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getFarmId() {
        return farmId;
    }

    public void setFarmId(Integer farmId) {
        this.farmId = farmId;
    }

    public String getSize() {
        return size;
    }

    public void setSize(String size) {
        this.size = size;
    }

    public String getShape() {
        return shape;
    }

    public void setShape(String shape) {
        this.shape = shape;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    /**
     * 状态
     */
    private String status;
}
